﻿using System.Runtime.InteropServices;

namespace Sirius.SystemDll
{
    public class kernel32
    {
        [DllImport("kernel32.dll")]
        public static extern IntPtr LoadLibraryA(string lpLibFileName);//加载应用到当前内存中
        [DllImport("kernel32.dll")]
        public static extern IntPtr GetProcAddress(IntPtr dllHandle, string funcName);//获取应用里的指定函数
        [DllImport("kernel32.dll")]
        public static extern bool FreeLibrary(IntPtr dllHandle);//释放指定已加载的应用
        [DllImport("kernel32.dll")]
        public static extern bool IsBadCodePtr(IntPtr dllHandle);//函数是否存在
    }
}